//
//  PullCollectionView.h
//  Pods
//
//  Created by apple on 20-6-7.
//
//

#import <UIKit/UIKit.h>
#import "MJRefresh.h"
#import "MessageInterceptor.h"
#import "EGORefreshTableHeaderView.h"
#import "LoadMoreTableFooterView.h"

@class PullCollectionView;
@protocol PullCollectionViewDelegate <NSObject>

/* After one of the delegate methods is invoked a loading animation is started, to end it use the respective status update property */
- (void)pullCollectionViewDidTriggerRefresh:(PullCollectionView*)pullCollectionView;
- (void)pullCollectionViewDidTriggerLoadMore:(PullCollectionView*)pullCollectionView;

@end


@interface PullCollectionView : UICollectionView{
    
}

@property (nonatomic, retain) UIColor *pullBackgroundColor;
@property (nonatomic, retain) UIColor *pullTextColor;
@property (nonatomic, strong) MJRefreshHeaderView *refreshHeaderView;
@property (nonatomic, strong) MJRefreshFooterView *refreshFooterView;

/* Delegate */
@property (nonatomic, assign) id<PullCollectionViewDelegate> pullDelegate;

- (void)configWithRefresh:(BOOL)isRefresh AndWithLoadMore:(BOOL)isLoadMore;
- (void)beginRefresh;

- (void)endRefreshing;
- (void)endLoadingMore;

@end
